package lzsrkpt.api.demo;

import java.util.HashMap;
import java.util.Map;

import com.google.gson.Gson;

public class RequestDemo {

	public static void main(String args[]) {

		try {

			ResponseBase resDic = Request.getInstance().dicUpLoad("DIC_SEX", "男", "1");
			System.out.println("字典上传：");
			System.out.println(resDic.getCode());
			System.out.println(resDic.getMsg());

			Map<String, String> map = new HashMap<String, String>();
			map.put("lastUpdateDtime", "2018-12-01 15:30:42");
			map.put("patientId", "6666");
			map.put("cardNo", "8888");
			map.put("cardTypeCode", "01");

			String dataJson = new Gson().toJson(map);
			ResponseBase resData = Request.getInstance().dataUpload("patientCardinfo", dataJson);
			System.out.println("数据上传：");
			System.out.println(resData.getCode());
			System.out.println(resData.getMsg());

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
		}
	}

}